package com.tjn.exception_;

/**
 * @author 陶镓妮
 * @version 1.0
 * 数组下标越界异常
 */
public class ArrayIndexOutOfBoundsException_ {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4};
        for (int i = 0; i <= 4; i++) {
            //访问了越界的数组下标，会抛出异常ArrayIndexOutOfBoundsException
            System.out.println(arr[i]);
        }
    }
}
